// Kony


#include "UI/ViewModel/MVVM_LoadSlot.h"

//初始化插槽 模型
void UMVVM_LoadSlot::InitializeSlot()
{
	//获取组件切换器的索引，这个索引序号是按照枚举的顺序
	const int32 WidgetSwitcherIndex = SlotStatus.GetValue();
	//根据索引广播 切换到对应组件页面
	SetWidgetSwitcherIndex.Broadcast(WidgetSwitcherIndex);
}
//设置玩家昵称
void UMVVM_LoadSlot::SetPlayerName(FString InPlayerName)
{
	//UE_MVVM_SET_PROPERTY_VALUE 这个是mvvm内置的宏 是用于 mvvm 广播这个属性变动
	UE_MVVM_SET_PROPERTY_VALUE(PlayerName, InPlayerName);
}
//设置地图名称
void UMVVM_LoadSlot::SetMapName(FString InMapName)
{
	UE_MVVM_SET_PROPERTY_VALUE(MapName, InMapName);
}
//设置玩家等级
void UMVVM_LoadSlot::SetPlayerLevel(int32 InLevel)
{
	UE_MVVM_SET_PROPERTY_VALUE(PlayerLevel, InLevel);
}
//设置加载槽名称
void UMVVM_LoadSlot::SetLoadSlotName(FString InLoadSlotName)
{
	UE_MVVM_SET_PROPERTY_VALUE(LoadSlotName, InLoadSlotName);
}
